﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta charset="utf-8" />
    <script src="../Scripts/jquery-1.11.3.min.js"></script>
    <script src="../Scripts/Uploader/Uploader6.0.js"></script>
    <link href="../Scripts/Uploader/Uploader6.0.css" rel="stylesheet" />
    <link href="../Scripts/Cover3.0/Cover3.0.css" rel="stylesheet" />
    <script src="../Scripts/Cover3.0/Cover3.0.js"></script>
</head>
<body>
    <br /><br /><br />
    <div>
        上传文件名：
        <span id="name"></span>
        <br />
        <img id="relativeName" />
    </div>
    <br /><br /><br />
    <div class="uploader uploader-default" id="uploadBtn"></div>
    <br />
    <br /><br />

    <script>
        /********剪切图片，后台自动处理模式handleType=0***********/
        var uploader = $('#uploadBtn').uploader({
            url: 'ws://localhost:63588/ashx/upload.ashx',
            fileExts: 'jpg;png',
            type: 'dialog',
            text: '剪切图片模式',
            more: false,//是否可以上传多个
            auto: true, //是否自动上传
            onSuccess: function (data) {
                console.info(data);
                $('#name').text(data.newName);
                $('#relativeName').attr('src', data.relativeName);
            }
        });
        //$('#uploadBtn').trigger('click');
    </script>
</body>
</html>
